package com.demo.mapper;

import com.demo.entity.CartInfoList;
import com.demo.entity.Cartitem;
import com.demo.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartitemMapper {
    List<CartInfoList> queryCartitemInfo(String uname);                             //���ﳵ��Ϣ�б�
    //��ӹ��ﳵ
    Cartitem selectCartInfoByProductId(String product_id);		//�Ȳ�ѯbuynum
    void addCartInfoByProductId(@Param("username")String username,@Param("product_id")String product_id,@Param("buynum")int buynum);				//buynum����0ʱ���1
    void updateCartByProductId(@Param("product_id")String product_id,@Param("addnum")int addnum);				//buynum������0ʱbuynum��1
    
    void deleteCartInfoByProductsName(String productsName);					//ɾ�����ﳵ��Ʒ
    void updateCartProductNum(@Param("cnum")int cnum,@Param("productsName")String productsName);				//�޸Ĺ��ﳵ��Ʒ����
    
    List<Message> queryMessageById(String pid);                                     //��ѯ������Ϣ������ƷID
    
}
